package C05C;

public class FruitTest {
    public static void main(String[] args) {
        Fruit apple = new Apple();
        apple.setName("苹果");
        apple.setPrice(7);
        apple.setArea("水星");
        System.out.println(apple.toString());
        Fruit Banana = new Banana();
        Banana.setName("梨");
        Banana.setPrice(5);
        Banana.setArea("金星");
        System.out.println(apple.toString());
        Fruit Grape = new Grape();
        Grape.setName("葡萄");
        Grape.setPrice(6);
        Grape.setArea("火星");
        System.out.println(apple.toString());
    }
}
